package cn.xuguowen.user.designPatten.factory.customer_abstract_factory;

/**
 * ClassName: ColorFactory
 * Package: cn.xuguowen.user.designPatten.factory.customer_abstract_factory
 * Description:
 * 具体工厂——生产具体颜色产品的
 * @Author 徐国文
 * @Create 2023/4/27 14:43
 * @Version 1.0
 */
public class ColorFactory extends AbstractFactory {
    @Override
    public Color getColor(String colorType) {
        Color color = null;
        if (colorType.equalsIgnoreCase("RED")) {
            color = new Red();
        } else if (colorType.equalsIgnoreCase("GREEN")) {
            color = new Green();
        } else if (colorType.equalsIgnoreCase("BLUE")) {
            color = new Blue();
        }
        return color;
    }

    @Override
    public Shape getShape(String shape) {
        return null;
    }
}
